<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>重庆中山图书馆</title>
<LINK rel="icon" href="favicon.ico" type="image/x-icon" >
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<link rel="bookmark" href="favicon.ico" />
<link type="text/css" rel="stylesheet"  href="${request.contextPath}/images/gotax.css" >
<link type="text/css" rel="stylesheet"  href="${request.contextPath}/images/tagimg.css" >
<script type="text/javascript" src="${request.contextPath}/res/js/jquery-1.9.1.min.js"></script>
<link type="text/css" rel="stylesheet"  href="${request.contextPath}/images/gotax.css" >
<link type="text/css" rel="stylesheet"  href="${request.contextPath}/images/tagimg.css" >
<script type="text/javascript" src="${request.contextPath}/res/js/jquery-1.9.1.min.js"></script>
<link type="text/css" rel="stylesheet" href="${request.contextPath}/res/formvalidator/style/validator.css" />
<script src="${request.contextPath}/res/formvalidator/formValidator.js" type="text/javascript"></script>
<script src="${request.contextPath}/res/formvalidator/formValidatorRegex.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function(){
	$.formValidator.initConfig({onError:function(msg){alert(msg)}});
	//username验证
	$("#us")
	.formValidator({onShow:"请输入用户",onFocus:"用户名至少6个字符,最多12个字符",onCorrect:"该用户名可以注册"})
	.inputValidator({min:6,max:12,onError:"您输入的用户名非法,请确认"})
	.ajaxValidator({
		async : true,
		url : "/library-app/register/checkusername.action",
		success : function(data){
			data =eval("("+data+")");
			return data.message.state;
		},
		buttons: $("#button"),
		error: function(jqXHR, textStatus, errorThrown){alert("服务器没有返回数据，可能服务器忙，请重试"+errorThrown);},
		onError : "该用户名不可用，请更换用户名",
		onWait : "正在对用户名进行合法性校验，请稍候..."
	});
	$("#remark")
	.formValidator({onShow:"请输入昵称",onFocus:"用户名至少6个字符,最多12个字符",onCorrect:"该昵称可以使用"})
	.inputValidator({min:6,max:12,onError:"您输入的昵称非法,请确认"});
	
	$("#password1")
	.formValidator({onShow:"请输入密码",onFocus:"密码不能为空",onCorrect:"密码合法"})
	.inputValidator({min:1,max:16,onError:"密码1-16位"});
	$("#password2")
	.formValidator({onShow:"请输入重复密码",onFocus:"密码不能为空",onCorrect:"密码一致"})
	.inputValidator({min:1,max:16,onError:"密码1-16位"})
	.compareValidator({desID:"password1",operateor:"=",onError:"2次密码不一致,请确认"});
	
	$("#csny")
	.formValidator({onShow:"请输入您的出生日期",onFocus:"请输入的出生",onCorrect:"您输入的日期合法"})
	.inputValidator({min:"1900-01-01",max:"2014-01-01",type:"value",onError:"日期必须在\"1900-01-01\"和\"2014-01-01\"之间"})

	$("#email")
	.formValidator({onShow:"请输入邮箱",onFocus:"邮箱至少6个字符,最多100个字符",onCorrect:"恭喜您,您输对了"})
	.inputValidator({min:6,max:100,onError:"您输入的邮箱长度非法,请确认"}).regexValidator({regExp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",onError:"您输入的邮箱格式不正确"})
	.ajaxValidator({
		async : true,
		url : "/library-app/register/checkemail.action",
		success : function(data){
			data =eval("("+data+")");
			return data.message.state;
		},
		buttons: $("#button"),
		error: function(jqXHR, textStatus, errorThrown){alert("服务器没有返回数据，可能服务器忙，请重试"+errorThrown);},
		onError : "该邮箱已经被注册",
		onWait : "正在对邮箱进行合法性校验，请稍候..."
	});
	
	$("#shouji")
	.formValidator({empty:true,onShow:"请输入您的手机号码",onFocus:"请输入您的手机号码",onCorrect:"谢谢您的合作",onEmpty:"您真的不想留手机号码啊？"})
	.inputValidator({min:11,max:11,onError:"手机号码必须是11位的,请确认"})
	.regexValidator({regExp:"^0?\\d{11}$",onError:"您输入的手机号码格式不正确"});;
});
</script>

<!--[if IE 6]>
<SCRIPT language=javascript src="js/DD_belatedPNG.js" type=text/javascript>
</SCRIPT>
<SCRIPT language="javascript" type="text/javascript">
  DD_belatedPNG.fix('*');
  function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
</SCRIPT>
<![endif]-->
<!--[if IE 6]>
<script src="js/DDPngMin.js"></script>
<script>DD_belatedPNG.fix('.ad_img img,#banner_ctr ul');</script>
<![endif]--> 
<style type="text/css">
.tagImg1 {
	display:block;
	position:absolute;
	left:0px;
	top:0px;
}
.tagDiv1 {
	background:#F4F4F4;
	position:absolute;
	top:0px;
}
.tagDiv_left1{left:240px;}
.tagDiv_left2{left:360px;}
.tagDiv_left3{left:480px;}
.caselist{

	position:relative;
	overflow:hidden;
}
</style>
</head>
<body>
<div class="container">

<!-- header头部 -->
<div class="header">
	<div class="ico_logo ico flt1">
    </div>
    <#if map.username??>
    	<div class="ico_user flt2">欢迎您,${map.username},<a href="${request.contextPath}/outlogin.html">安全退出</a></div>
    <#else>
    <div class="ico_user flt2"><a href="${request.contextPath}/login.html">登录</a>/<a href="${request.contextPath}/register.html">注册</a><span><a href="register.html">帮助</a></span></div>
    </#if>
</div>

<!-- nav导航 -->
<div class="nav">
	<div class="menu1 flt1 cle">
    	<a href="${request.contextPath}/index.html">首 页</a>
    	<a href="${request.contextPath}/libraryinfo.html">本馆概况</a>
        <a href="${request.contextPath}/list.html">书籍中心</a>
        <a href="${request.contextPath}/backbook.html">还书中心</a>
        <a href="${request.contextPath}/car.html" >借书篮</a>
    </div>
</div>

<!-- banner焦点图 -->
<div class="banner cle">
    <div id="myfocus"><!--只需定义这个ID即可-->
        <div class="pics">
            <ul>
                <li><a href="xwdt013.html"><img  src="images/banner001.jpg" /></a></li>  
                <li><a href="fwxm.html"><img  src="images/banner001.jpg" /></a></li>  
                <li><a href="fwsf.html"><img src="images/banner001.jpg" /></a></li>
                <li><a href="#"><img  src="images/banner001.jpg" /></a></li>  	
                <li><a href="fwsf.html"><img src="images/banner001.jpg"/></a></li>
            </ul>
        </div>
    </div><!--bannerjs图结束-->
</div>

<div class="regiter" >
	<form action="/library-app/register/registerdata.action" method="post" name="form1" id="form1">
  <table border="0px" style="font-size:12px;margin:20px auto;">
 	 <tr> 
      <td align="right">昵称:</td>
      <td><input type="text" id="remark" name="remark"/></td>
      <td><div id="remarkTip"></div></td>
    </tr>
    <tr> 
      <td align="right">用户名:</td>
      <td><input type="text" id="us" name="us"/></td>
      <td><div id="usTip"></div></td>
    </tr>
    <tr> 
      <td align="right">密码:</td>
      <td><input type="password" id="password1" name="password1"  /></td>
      <td><div id="password1Tip"></div></td>
    </tr>
    <tr> 
      <td align="right">重复密码:</td>
      <td><input type="password" id="password2" name="password2"/></td>
      <td><div id="password2Tip" ></div></td>
    </tr>
    <tr> 
      <td align="right">您的性别:</td>
      <td><input type="radio" id="sex" value="1" name="xb_one" />
        男&nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" id="sex1" value="2" name="xb_one" />
        女</td>
      <td><div id="sexTip"></div></td>
    </tr>
    <tr> 
      <td align="right">出生日期:</td>
      <td><input type="text" id="csny" name="csny"/></td>
      <td><div id="csnyTip"></div></td>
    </tr>
    <tr> 
      <td align="right">电子邮箱:</td>
      <td><input type="text" id="email" name="email"/></td>
      <td><div id="emailTip"></div></td>
    </tr>
    <tr> 
      <td align="right">手机号码:</td>
      <td><input type="text" id="shouji" name="shouji" /></td>
      <td><div id="shoujiTip"></div></td>
    </tr>
    <tr>
    	<td></td>
    	<td><input type="submit"></input></td>
    <tr>
  </table>
  	
</form>

</div>
<!-- footer\底部信息 -->
<div class="footer cle">
	<div class="flt1">重庆理工大学中山图书馆</div>
    <div class="flt2">© 2013-2014 .All Rights Reserved<a href="#">渝ICP备xxxxxxx号-1</a></div>
</div>
</div>
</body>
</html>
